package cc.wsyw126.java.lambda;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by junpeng.yang on 16/8/23.
 */
public class ListAllListELement {
    List<String> list = Arrays.asList("first", "second", "third", "four");

    public static void main(String[] args) {
        ListAllListELement listAllListELement = new ListAllListELement();
        for(String s : listAllListELement.list){
            System.out.println(s);
        }

        System.out.println();

        listAllListELement.list.forEach(n -> System.out.println(n));

        System.out.println();
        listAllListELement.list.forEach(System.out::println);


    }
}
